package com.growthsee.rider.enumeration;

/**
 * 操作枚举
 */
public enum  OperateEnum {
    add(1, "新增"),
    update(2, "更新"),
    delete(3, "删除");

    private final int value;
    private final String name;

    private OperateEnum(int v, String desc) {
        this.value = v;
        this.name = desc;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static OperateEnum get(int strValue) {
        for (OperateEnum e : values()) {
            if (e.getValue() == strValue) {
                return e;
            }
        }
        return null;
    }
}
